package com.nail.api.customMake.dao;

import com.nail.api.customMake.bean.PhoneTexture;
import com.nail.dao.IBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by jie on 2017/9/17.
 */
@Mapper
public interface IPhoneTextureDao extends IBaseDao<PhoneTexture>{
    @Select("select * from phone_texture order by is_sort desc,create_time desc limit #{begin},#{end}")
    public List<PhoneTexture> getPhoneTextures(@Param("begin") Integer begin, @Param("end") Integer end);

    @Update("update phone_texture set is_sort = #{sort} where id = #{id}")
    public void setSort(@Param("id") Long id,@Param("sort") Integer sort);

    @Update("update phone_texture set is_able = #{isAble} where id = #{id}")
    public void setIsAble(@Param("id") Long id,@Param("isAble") Integer isAble);

}
